#include <iostream>

using namespace std;

long long m, n, a;

int main()
{
	cin >> n >> m >> a;
	cout << (1+(n-1)/a) * (1+(m-1)/a) << endl;
	return 0;
}
